<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数据调用</title>
</head>
<body>
    <?php
        //引入外部文件
        include 'demo102.php';
        //var_dump($arr);
        $str='';
        foreach($arr as $key=>$v){
            $str.='<tr>';
            $str.='<td>'.$v['name'].'</td>';
            $str.='<td>'.$v['age'].'</td>';
            $str.='</tr>';
        }

        //var_dump($str);
    ?>

    <table width="400" height="300" border="1" cellspacing="0">
        <tr>
            <th>姓名</th>
            <th>年龄</th>
        </tr>
        <?php  echo $str; ?>
    </table>
</body>
</html>